#include "ui_control.h"
/*!
* \file  ui_label.h
* \brief Label
* 
*
* 
* \author patdz@qq.com
* \version 1.0
* \date 2014/06/10
*/
_SSL_BEGIN
_SSUIL_BEGIN

#pragma warning(push)
#pragma warning(disable:4251)
#pragma warning(disable:4250)

class SSUI_CLASS UILabel :
	public UIControl
{
public:
	UILabel();
	virtual ~UILabel();

	// base_control
public:
	virtual bool ApplyAttributes(IUIBuilderInterface *ui_builder, 
		IUIXMLDocumentInterface *xml_document, UIXmlNode node);
	virtual void SetPresetPosition(const UIPresetPosition &preset_pos);

	//
protected:
	virtual int GetControlAutoWidth();
	virtual int GetControlAutoHeight();
	virtual void OnRenderForeground(const UIRenderContext &rc);

public:
	void SetText(const tstring &text);
	void SetTextColor(unsigned long color);
	void SetTextFontId(const tstring &font_id);
	void SetTextStyle(unsigned int style);
	tstring GetText() const;
	unsigned long GetTextStyle();
	tstring GetTextFontId() const;

public:
	void SetTextBackgroundTransparent(bool transparent);

protected:
	tstring text_;
	unsigned long text_color_;
	tstring text_font_id_;
	unsigned int text_style_ori_;
	unsigned int text_style_;

	bool transparent_;
};
#pragma warning(pop)

_SSUIL_END
_SSL_END
